import request from '@/utils/request'

export function fetchList(data) {
  return request({
    url: '/channel/list',
    method: 'post',
    data
  })
}

export function createCanal(data) {
  return request({
    url: '/channel/add',
    method: 'post',
    data
  })
}

export function detail(param) {
  return request({
    url: '/channel/detail/' + param,
    method: 'get'
  })
}

export function updateCanal(data) {
  return request({
    url: '/channel/update',
    method: 'post',
    data
  })
}

export function deleteCanal(param) {
  return request({
    url: '/channel/del/' + param,
    method: 'post'
  })
}

export function resetPwd(param) {
  return request({
    url: '/channel/reset/pwd/' + param,
    method: 'post'
  })
}
